-
Notifications
You must be signed in to change notification settings - Fork 237
Remove native named pipes implementation #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove native named pipes implementation #878
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my area of expertise but "looks" like there is less code overall so 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just one nit to stave off the analyzers
src/PowerShellEditorServices.Protocol/MessageProtocol/Channel/NamedPipeServerListener.cs
Show resolved
Hide resolved
@@ -765,7 +765,7 @@ public Task<RunspaceHandle> GetRunspaceHandleAsync(CancellationToken cancellatio | |||
executionOptions, | |||
true); | |||
|
|||
throw e; | |||
throw; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof. Good catch
@@ -160,13 +160,12 @@ private async Task OnExecutionCompletedAsync(Task executeTask) | |||
// Respond to the disconnect request and stop the server | |||
await _disconnectRequestContext.SendResultAsync(null); | |||
Stop(); | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
a25a281
to
efe6358
Compare
@PoshChan please remind me in 10 minutes |
@TylerLeonhardt, will remind you in 10 minutes |
@TylerLeonhardt, this is the reminder you requested 10 minutes ago |
efe6358
to
7d68b9b
Compare
b9150fb
to
5d11aee
Compare
this PR now checks for 6.0 |
Now that PowerShell Core 6.0 is EOL, all PowerShell Core versions are built on .NET Core 2.1!
This means that we can take advantage of things added to 2.1, namely the CurrentUserOnly flag on PipeOptions which sets up your named pipes so that only the current user can access them.
Because of this, we can remove the Native Pipe implementation that we took from PowerShell Core.
This needs a PR over to vscode-powershell that says PowerShell Core 6.0 is not supported... but the important change is in this PR.